home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / shellservice / nsIShellService.h
C/C++ Source or Header  |  2006-05-08  |  10KB  |  231 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIShellService.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIShellService_h__
  6. #define __gen_nsIShellService_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIDOMElement; /* forward declaration */
  18.  
  19.  
  20. /* starting interface:    nsIShellService */
  21. #define NS_ISHELLSERVICE_IID_STR "d6f62053-3769-46f6-bd2b-0a1440d6c394"
  22.  
  23. #define NS_ISHELLSERVICE_IID \
  24.   {0xd6f62053, 0x3769, 0x46f6, \
  25.     { 0xbd, 0x2b, 0x0a, 0x14, 0x40, 0xd6, 0xc3, 0x94 }}
  26.  
  27. class NS_NO_VTABLE nsIShellService : public nsISupports {
  28.  public: 
  29.  
  30.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISHELLSERVICE_IID)
  31.  
  32.   /**
  33.    * Determines whether or not Firefox is the "Default Browser."
  34.    * This is simply whether or not Firefox is registered to handle 
  35.    * http links. 
  36.    * 
  37.    * @param aStartupCheck true if this is the check being performed
  38.    *                      by the first browser window at startup, 
  39.    *                      false otherwise. 
  40.    */
  41.   /* boolean isDefaultBrowser (in boolean aStartupCheck); */
  42.   NS_IMETHOD IsDefaultBrowser(PRBool aStartupCheck, PRBool *_retval) = 0;
  43.  
  44.   /**
  45.    * Registers Firefox as the "Default Browser."
  46.    *
  47.    * @param aClaimAllTypes Register Firefox as the handler for 
  48.    *                       additional protocols (ftp, chrome etc)
  49.    *                       and web documents (.html, .xhtml etc).
  50.    * @param aForAllUsers   Whether or not Firefox should attempt
  51.    *                       to become the default browser for all
  52.    *                       users on a multi-user system. 
  53.    */
  54.   /* void setDefaultBrowser (in boolean aClaimAllTypes, in boolean aForAllUsers); */
  55.   NS_IMETHOD SetDefaultBrowser(PRBool aClaimAllTypes, PRBool aForAllUsers) = 0;
  56.  
  57.   /** 
  58.    * Used to determine whether or not to show a "Set Default Browser"
  59.    * query dialog. This attribute is true if the application is starting
  60.    * up and "browser.shell.checkDefaultBrowser" is true, otherwise it
  61.    * is false.
  62.    */
  63.   /* attribute boolean shouldCheckDefaultBrowser; */
  64.   NS_IMETHOD GetShouldCheckDefaultBrowser(PRBool *aShouldCheckDefaultBrowser) = 0;
  65.   NS_IMETHOD SetShouldCheckDefaultBrowser(PRBool aShouldCheckDefaultBrowser) = 0;
  66.  
  67.   /** 
  68.    * Flags for positioning/sizing of the Desktop Background image.
  69.    */
  70.   enum { BACKGROUND_TILE = 1 };
  71.  
  72.   enum { BACKGROUND_STRETCH = 2 };
  73.  
  74.   enum { BACKGROUND_CENTER = 3 };
  75.  
  76.   enum { BACKGROUND_FILL = 4 };
  77.  
  78.   /**
  79.      * Sets the desktop background image using either the HTML <IMG> 
  80.      * element supplied or the background image of the element supplied.
  81.      *
  82.      * @param aImageElement Either a HTML <IMG> element or an element with
  83.      *                      a background image from which to source the
  84.      *                      background image. 
  85.      * @param aPosition     How to place the image on the desktop
  86.      */
  87.   /* void setDesktopBackground (in nsIDOMElement aElement, in long aPosition); */
  88.   NS_IMETHOD SetDesktopBackground(nsIDOMElement *aElement, PRInt32 aPosition) = 0;
  89.  
  90.   /**
  91.    * Constants identifying applications that can be opened with
  92.    * openApplication.
  93.    */
  94.   enum { APPLICATION_MAIL = 0 };
  95.  
  96.   enum { APPLICATION_NEWS = 1 };
  97.  
  98.   /**
  99.    * Opens the application specified. If more than one application of the
  100.    * given type is available on the system, the default or "preferred"
  101.    * application is used. 
  102.    */
  103.   /* void openApplication (in long aApplication); */
  104.   NS_IMETHOD OpenApplication(PRInt32 aApplication) = 0;
  105.  
  106.   /** 
  107.    * The desktop background color, visible when no background image is 
  108.    * used, or if the background image is centered and does not fill the 
  109.    * entire screen. A rgb value, where (r << 16 | g << 8 | b)
  110.    */
  111.   /* attribute unsigned long desktopBackgroundColor; */
  112.   NS_IMETHOD GetDesktopBackgroundColor(PRUint32 *aDesktopBackgroundColor) = 0;
  113.   NS_IMETHOD SetDesktopBackgroundColor(PRUint32 aDesktopBackgroundColor) = 0;
  114.  
  115. };
  116.  
  117. /* Use this macro when declaring classes that implement this interface. */
  118. #define NS_DECL_NSISHELLSERVICE \
  119.   NS_IMETHOD IsDefaultBrowser(PRBool aStartupCheck, PRBool *_retval); \
  120.   NS_IMETHOD SetDefaultBrowser(PRBool aClaimAllTypes, PRBool aForAllUsers); \
  121.   NS_IMETHOD GetShouldCheckDefaultBrowser(PRBool *aShouldCheckDefaultBrowser); \
  122.   NS_IMETHOD SetShouldCheckDefaultBrowser(PRBool aShouldCheckDefaultBrowser); \
  123.   NS_IMETHOD SetDesktopBackground(nsIDOMElement *aElement, PRInt32 aPosition); \
  124.   NS_IMETHOD OpenApplication(PRInt32 aApplication); \
  125.   NS_IMETHOD GetDesktopBackgroundColor(PRUint32 *aDesktopBackgroundColor); \
  126.   NS_IMETHOD SetDesktopBackgroundColor(PRUint32 aDesktopBackgroundColor); 
  127.  
  128. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  129. #define NS_FORWARD_NSISHELLSERVICE(_to) \
  130.   NS_IMETHOD IsDefaultBrowser(PRBool aStartupCheck, PRBool *_retval) { return _to IsDefaultBrowser(aStartupCheck, _retval); } \
  131.   NS_IMETHOD SetDefaultBrowser(PRBool aClaimAllTypes, PRBool aForAllUsers) { return _to SetDefaultBrowser(aClaimAllTypes, aForAllUsers); } \
  132.   NS_IMETHOD GetShouldCheckDefaultBrowser(PRBool *aShouldCheckDefaultBrowser) { return _to GetShouldCheckDefaultBrowser(aShouldCheckDefaultBrowser); } \
  133.   NS_IMETHOD SetShouldCheckDefaultBrowser(PRBool aShouldCheckDefaultBrowser) { return _to SetShouldCheckDefaultBrowser(aShouldCheckDefaultBrowser); } \
  134.   NS_IMETHOD SetDesktopBackground(nsIDOMElement *aElement, PRInt32 aPosition) { return _to SetDesktopBackground(aElement, aPosition); } \
  135.   NS_IMETHOD OpenApplication(PRInt32 aApplication) { return _to OpenApplication(aApplication); } \
  136.   NS_IMETHOD GetDesktopBackgroundColor(PRUint32 *aDesktopBackgroundColor) { return _to GetDesktopBackgroundColor(aDesktopBackgroundColor); } \
  137.   NS_IMETHOD SetDesktopBackgroundColor(PRUint32 aDesktopBackgroundColor) { return _to SetDesktopBackgroundColor(aDesktopBackgroundColor); } 
  138.  
  139. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  140. #define NS_FORWARD_SAFE_NSISHELLSERVICE(_to) \
  141.   NS_IMETHOD IsDefaultBrowser(PRBool aStartupCheck, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsDefaultBrowser(aStartupCheck, _retval); } \
  142.   NS_IMETHOD SetDefaultBrowser(PRBool aClaimAllTypes, PRBool aForAllUsers) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDefaultBrowser(aClaimAllTypes, aForAllUsers); } \
  143.   NS_IMETHOD GetShouldCheckDefaultBrowser(PRBool *aShouldCheckDefaultBrowser) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetShouldCheckDefaultBrowser(aShouldCheckDefaultBrowser); } \
  144.   NS_IMETHOD SetShouldCheckDefaultBrowser(PRBool aShouldCheckDefaultBrowser) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetShouldCheckDefaultBrowser(aShouldCheckDefaultBrowser); } \
  145.   NS_IMETHOD SetDesktopBackground(nsIDOMElement *aElement, PRInt32 aPosition) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDesktopBackground(aElement, aPosition); } \
  146.   NS_IMETHOD OpenApplication(PRInt32 aApplication) { return !_to ? NS_ERROR_NULL_POINTER : _to->OpenApplication(aApplication); } \
  147.   NS_IMETHOD GetDesktopBackgroundColor(PRUint32 *aDesktopBackgroundColor) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDesktopBackgroundColor(aDesktopBackgroundColor); } \
  148.   NS_IMETHOD SetDesktopBackgroundColor(PRUint32 aDesktopBackgroundColor) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDesktopBackgroundColor(aDesktopBackgroundColor); } 
  149.  
  150. #if 0
  151. /* Use the code below as a template for the implementation class for this interface. */
  152.  
  153. /* Header file */
  154. class nsShellService : public nsIShellService
  155. {
  156. public:
  157.   NS_DECL_ISUPPORTS
  158.   NS_DECL_NSISHELLSERVICE
  159.  
  160.   nsShellService();
  161.  
  162. private:
  163.   ~nsShellService();
  164.  
  165. protected:
  166.   /* additional members */
  167. };
  168.  
  169. /* Implementation file */
  170. NS_IMPL_ISUPPORTS1(nsShellService, nsIShellService)
  171.  
  172. nsShellService::nsShellService()
  173. {
  174.   /* member initializers and constructor code */
  175. }
  176.  
  177. nsShellService::~nsShellService()
  178. {
  179.   /* destructor code */
  180. }
  181.  
  182. /* boolean isDefaultBrowser (in boolean aStartupCheck); */
  183. NS_IMETHODIMP nsShellService::IsDefaultBrowser(PRBool aStartupCheck, PRBool *_retval)
  184. {
  185.     return NS_ERROR_NOT_IMPLEMENTED;
  186. }
  187.  
  188. /* void setDefaultBrowser (in boolean aClaimAllTypes, in boolean aForAllUsers); */
  189. NS_IMETHODIMP nsShellService::SetDefaultBrowser(PRBool aClaimAllTypes, PRBool aForAllUsers)
  190. {
  191.     return NS_ERROR_NOT_IMPLEMENTED;
  192. }
  193.  
  194. /* attribute boolean shouldCheckDefaultBrowser; */
  195. NS_IMETHODIMP nsShellService::GetShouldCheckDefaultBrowser(PRBool *aShouldCheckDefaultBrowser)
  196. {
  197.     return NS_ERROR_NOT_IMPLEMENTED;
  198. }
  199. NS_IMETHODIMP nsShellService::SetShouldCheckDefaultBrowser(PRBool aShouldCheckDefaultBrowser)
  200. {
  201.     return NS_ERROR_NOT_IMPLEMENTED;
  202. }
  203.  
  204. /* void setDesktopBackground (in nsIDOMElement aElement, in long aPosition); */
  205. NS_IMETHODIMP nsShellService::SetDesktopBackground(nsIDOMElement *aElement, PRInt32 aPosition)
  206. {
  207.     return NS_ERROR_NOT_IMPLEMENTED;
  208. }
  209.  
  210. /* void openApplication (in long aApplication); */
  211. NS_IMETHODIMP nsShellService::OpenApplication(PRInt32 aApplication)
  212. {
  213.     return NS_ERROR_NOT_IMPLEMENTED;
  214. }
  215.  
  216. /* attribute unsigned long desktopBackgroundColor; */
  217. NS_IMETHODIMP nsShellService::GetDesktopBackgroundColor(PRUint32 *aDesktopBackgroundColor)
  218. {
  219.     return NS_ERROR_NOT_IMPLEMENTED;
  220. }
  221. NS_IMETHODIMP nsShellService::SetDesktopBackgroundColor(PRUint32 aDesktopBackgroundColor)
  222. {
  223.     return NS_ERROR_NOT_IMPLEMENTED;
  224. }
  225.  
  226. /* End of implementation class template. */
  227. #endif
  228.  
  229.  
  230. #endif /* __gen_nsIShellService_h__ */
  231.